<%= form_for(resource, :as => resource_name, :url => session_path(resource_name), html: {class: 'form-horizontal'}) do |f| %>
  <legend>Sign in</legend>

  <fieldset>
    <div class="control-group">
      <%= f.label :email, class: 'control-label' %>
      <div class="controls">
        <%= f.email_field :email %>
      </div>
    </div>

    <div class="control-group">
      <%= f.label :password, class: 'control-label' %>
      <div class="controls">
        <%= f.password_field :password %>
      </div>
    </div>

    <% if devise_mapping.rememberable? -%>
      <div class="control-group">
        <div class="controls">
          <%= f.label :remember_me, class: "checkbox" do %>
            <%= f.check_box :remember_me %> Remember me
          <% end %>
        </div>
      </div>
    <% end -%>

  </fieldset>

  <div class="form-actions">
    <%= f.submit "Sign in", class: "btn btn-primary" %>
  </div>
<% end %>

<%= render "devise/shared/links" %>
